﻿using System;
using MathService.Values;

namespace MathService.Statistic.RandomNumbers
{
    [Serializable]
    public abstract class DoubleRND : IValueRead<double>
    {
        protected readonly Random f_Generator = new Random(DateTime.Now.TimeOfDay.Milliseconds);

        protected double f_sigma = 1;
        protected double f_m;


        public double sigma { get { return f_sigma; } set { f_sigma = value; } }
        public double m { get { return f_m; } set { f_m = value; } }


        public double Value { get { return GetValue(); } }

        protected DoubleRND() { }

        protected DoubleRND(double sigma) { f_sigma = sigma; }

        protected DoubleRND(double sigma, double m) { f_sigma = sigma; f_m = m; }

        protected abstract double GetValue();

        public static implicit operator double(DoubleRND Value) { return Value.Value; }
    }
}
